#ifndef GAMESTATE_H
#define GAMESTATE_H

#include <deque>
#include <boost/shared_ptr.hpp>

#include "Clock.h"

namespace ENE{
	class IGameEvent;
}

namespace ChuGame
{

struct StateData
{
	StateData() : data(0){}
	int data;
};

class GameState
{
public:
	GameState() : m_currentData(), m_oldData(), m_limit(1.f) {}

	void applyEvent(boost::shared_ptr<const ENE::IGameEvent> event);

	Clock& getClock();

	void setData(int data)
	{
		m_currentData.data = data;
	}
private:
	Clock m_clock;

	float m_limit;
	StateData m_oldData;
	StateData m_currentData;
	std::deque<boost::shared_ptr<const ENE::IGameEvent> > m_events;
};

}//namespace ChuGame

#endif

